/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cxhd.pacs.controller;

import com.cxhd.pacs.DataConfig;
import com.jfinal.core.Controller;

/**
 *
 * @author 52461
 */
public class MainCtrl extends Controller {

    public void index() {

        if (DataConfig.getInstance().getConfig().get("system_mode") != null && DataConfig.getInstance().getConfig().get("system_mode").equalsIgnoreCase("all")) {
            redirect("/patient");
        } else{
         render("/main2.jsp");
        }
       

    }

    public void logout() {
        System.out.println("***********************************************");
        removeSessionAttr("CX_JSESSION_USER");
        System.out.println("22222222222222222222"+getSessionAttr("CX_JSESSION_USER"));
        getSession().invalidate();
        redirect("/main");
    }

}
